package com.wei.service.impl;

import com.wei.model.ReviewDO;
import com.wei.mapper.ReviewMapper;
import com.wei.service.IReviewService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.wei.vo.ReviewVO;
import lombok.RequiredArgsConstructor;
import org.springframework.stereotype.Service;

import java.util.Collections;
import java.util.List;

/**
 * <p>
 * 评论表 服务实现类
 * </p>
 *
 * @author 蔡徐坤
 * @since 2025-07-28
 */
@Service
@RequiredArgsConstructor
public class ReviewServiceImpl extends ServiceImpl<ReviewMapper, ReviewDO> implements IReviewService {

    private final ReviewMapper reviewMapper;

    @Override
    public List<ReviewVO> listReviewsByProductId(Long productId) {
        return reviewMapper.listReviewsByProductId(productId);
    }
}
